The Extension Scope ('scop') Resource
You must define at least one extension scope resource, of typegxExtensionScopeType
, for each printing extension that you develop. This resource indicates the types of drivers and imaging systems with which your extension is compatible. Figure 6-6 shows the structure of an extension scope resource.Figure 6-6 The extension scope resource
The extension scope resource consists of a variable number of scope values.
The ID of each extension scope resource defines the type of information that is contained in the resource values. Constants for the scope resource IDs are shown in Table 6-9.
- Count. The number of scope types defined in this resource.
- Scope type ID. A long integer value that specifies an imaging system or driver. These values are specified as four-character resource-type names in your resource definition. Constants that you can use for the resource types are shown in Table 6-8.
You can include several different extension scope resources in your extension file to pinpoint the scope of your extension. The values in all scope resources are unioned together to produce the exact scope of your extension. A typical pair of scope resources for an extension is shown in Listing 6-5. You can find other examples of scope resources in Listing 2-21 on page 2-35 and Listing 2-22 on page 2-36 in the chapter "Printing Extensions."
Listing 6-5 An example of a pair of extension resources used together
resource gxExtensionScopeType (gxPrinterScopeID, sysHeap, purgeable) { { gxPostscriptPrinterType, gxRasterPrinterType }; }; resource gxExtensionScopeType (gxPrinterExceptionScopeID, sysHeap, purgeable) { { 'ODD1' }; };In this example, the first extension scope resource defines the extension as compatible with all PostScript and raster printers. The second resource specifies that the extension is not compatible with the printer driver name'ODD1'
. The net result is that the extension is compatible with all PostScript and raster printers that do not use the'ODD1'
driver.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help